|
This page last changed on Feb 05, 2007 by rosie@atlassian.com.
Templates are written in the same notation as other pages in Confluence with special markup to insert form fields.
Here are the three kinds of form fields supported and the markup to create them:
| Text field |
|
Creates a text input field for a variable called VAR |
| Text area |
|
Creates a 5 x 10 text-area for a variable called VAR |
| Drop down menu |
|
Creates a drop-down box containing the values "one", "two", "three" and "four" |
Every input field must have a unique name. If you have more than one text input field in the same template with the same name, Confluence will make sure that they all end up with the same value (This is useful if you need the same information in more than one place in the page).
 | Warning
There must be no spaces between the @-signs in the markup. This means you can't have items in your drop-down lists that contain spaces. |
Improved Markup
The above formatting is the basic markup bundled with Confluence, but two plugins expand on this markup to provide greater functionality. Links to these plugins and a comparison can be found in the Working with Templates Overview.
RELATED TOPICS
Working with Templates Overview
Scaffolding Plugin
Zones Plugin
Adding a Template
Editing a Template
Creating a Page using a Template
Take me back to Confluence 2 Home
|
I know those form fields from an open-source Wiki. Here I cannot find any information about how to use those form variables after they have been defined for a page. Somewhere you're writing that it's for structuring the content but what can I DO with it?
For example, I would like to create a page which links all pages with the variable "myname". Can I only do this with labels?

Posted by tattva at Feb 03, 2006 07:57
|
|
It would be nice to be able to create a list out of the users within a particular group (similar to what you can do with the {scaffold} plug-in). Something like @VAR|groupmembers(confluence-users) would be good.
Default values for variables would also be high on the basic-additions wishlist.
In general more "special markup" functionality would be great (or more documented functionality, as I suspect there is more than is here).

Posted by rwarren@picarro.com at Mar 01, 2006 15:47
|
|
Yes, you can use the {contentbylabel:myname} to do that.

Posted by gfraser at Mar 01, 2006 16:05
|
|
Are there some sample templates that use forms? A search isn't so fruitful...

Posted by amyoung at Mar 06, 2006 12:56
|
|
Can a dropdown list be created from sql output?

Posted by melogin at Mar 30, 2006 09:52
|
|
You can now find an example at Adding a Template

Posted by david.soul@atlassian.com at Aug 14, 2006 19:44
|
|
This is not possible without creating a plugin

Posted by david.soul@atlassian.com at Aug 14, 2006 19:46
|
|
You also can't have a "-" between the @ signs in a template. This should be documented.

Posted by gkotik at Aug 18, 2006 19:36
|
|
I'm experimenting with the form fields directly on a page (not a template). I've noticed switching between Rich text and wiki markup editing causes the @@ signs to disappear. Is there any way of preventing this? Also, is there any way of controlling the alignment of the form fields. I'm using a table to align form fields, is there another way?

Posted by ahardy at Aug 21, 2006 08:18
|
|
Hey Alan,
did you find any solution for that issue yet?

Posted by loetterle at Sep 12, 2006 10:35
|
|
I couldn't get the forms to work on a page outside of a template. Also, you can't use a drop-down in a table, because the | is read as another cell. This is a big problem for my design.

Posted by sltrunzo at Nov 02, 2006 15:45
|
|
This size of textares not quit work.
When specified a size with axb, as row x column. Firefox only recognize the row, but not IE, and both FF and IE don't recognize columns, then they insert column=40 by default.
since that, I tried to specify only the number of row, like @textarea|textarea(5)@, now both IE and FF recognize the number of rows, and work nice with default column = 40.
I believe it should be a bug. If it is open source I would fix it myself. Should it be fixed quick and have us updated? so that we could continue using textarea and be able to specify number of column.

Posted by dawen.tan@sadasystems.com at Dec 14, 2006 15:34
|
|
Actually, I believe it is a bug for rendering size of textarea.
When specified @var|texrarea(5x10)@, the size is rendered to html as :<textarea name="variableValues.var" rows="5x10" cols="40"></textarea> that is a mistake output. currently, to work around it, I only specify the row number, like: (var), then we would have:<textarea name="variableValues.var" rows="5" cols="40"></textarea> although when column number is not under control, at least, we could make number of row as we expected.

Posted by dawen.tan@sadasystems.com at Dec 14, 2006 18:00
|
|
can i submit the form and capture the values ?
what are the real use-cases of these ?

Posted by nayanah at Jan 12, 2007 17:24
|
You guys need to update the documentation!!!!!
commenets from Filip De Haes [Filip.DeHaes@vdab.be] about the documentation for textarea:
Hey,
Just wanna mention the textarea size properties of the confluence wiki do work, but the documentation is wrong.
Just replace the x with ,
E.g. @VAR|textarea(30,160)@
Maybe you can add it to the comments at http://confluence.atlassian.com/display/CONF20/Form+Field+Markup+for+Templates. I'm too lazy.
Cheers,
Filip

Posted by dawen.tan@sadasystems.com at Feb 05, 2007 11:42
|
|
thank you, fixed

Posted by rosie@atlassian.com at Feb 05, 2007 16:47
|
|